import {Breadcrumb} from 'antd'

const AppBread = function(props){
    let path = props.pathname;
    let arr = path.split('/');
    return (
        <Breadcrumb style={{ margin: '16px 0' }}>
            <Breadcrumb.Item>Home</Breadcrumb.Item>
            {
                path === '/' ?
                null
                :
                arr.map(item=><Breadcrumb.Item key={item} >{item}</Breadcrumb.Item>)
            }
        </Breadcrumb>
    )
}

export default AppBread